import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';
import { RoleEnum } from '/@/enums/roleEnum';

const dashboard: AppRouteModule = {
  path: '/manage',
  name: 'Manage',
  component: LAYOUT,
  redirect: '/manage/user',
  meta: {
    orderNo: 10,
    icon: 'ion:grid-outline',
    // title: t('routes.dashboard.dashboard'),
    title: '后台管理',
    // roles: ['10010', RoleEnum.SUPER],
  },
  children: [
    {
      path: 'user',
      name: 'User',
      component: () => import('/@/views/manage/user/index.vue'),
      meta: {
        roles: ['10010', RoleEnum.SUPER],
        title: '用户管理',
      },
    },
    {
      path: 'role',
      name: 'Role',
      component: () => import('/@/views/manage/role/index.vue'),
      meta: {
        title: '角色管理',
        roles: ['10020', RoleEnum.SUPER],
      },
    },
    {
      path: 'auth',
      name: 'Auth',
      component: () => import('/@/views/manage/auth/index.vue'),
      meta: {
        title: '权限配置',
        roles: ['10070', RoleEnum.SUPER],
      },
    },
    {
      path: 'group',
      name: 'Group',
      component: () => import('/@/views/manage/group/index.vue'),
      meta: {
        // affix: true,
        title: '相机分组管理',
        roles: ['10030', RoleEnum.SUPER],
      },
    },
    // {
    //   path: 'patrol',
    //   name: 'Patrol',
    //   meta: {
    //     // affix: true,
    //     title: '巡护管理',
    //   },
    //   children: [
    //     {
    //       path: 'p_user',
    //       name: 'PUser',
    //       component: () => import('/@/views/manage/patrol/user/index.vue'),
    //       meta: {
    //         // affix: true,
    //         title: '巡护用户管理',
    //         roles: ['10040', RoleEnum.SUPER],
    //       },
    //     },
    //     {
    //       path: 'p_stat',
    //       name: 'PStat',
    //       component: () => import('/@/views/manage/patrol/stat/index.vue'),
    //       meta: {
    //         // affix: true,
    //         title: '巡护信息统计',
    //         roles: ['10050', RoleEnum.SUPER],
    //       },
    //     },
    //     {
    //       path: 'p_record',
    //       name: 'PRecord',
    //       component: () => import('/@/views/manage/patrol/record/index.vue'),
    //       meta: {
    //         // affix: true,
    //         title: '巡护信息',
    //         roles: ['10060', RoleEnum.SUPER],
    //       },
    //     },
    //   ],
    // },
    {
      path: 'label',
      name: 'Label',
      component: () => import('/@/views/manage/label/index.vue'),
      meta: {
        // affix: true,
        title: '标签管理',
        roles: ['10010', RoleEnum.SUPER],
      },
    },
  ],
};

export default dashboard;
